<style lang='scss' scoped>
.noticedetails{
    background-color: #fff;
    text-align:justify;
    padding: 0 0.5rem;
    margin-top: 1rem;
   .notice_title{
        padding: 0.275rem 0; 
        border-bottom: 0.025rem solid rgb(230, 230, 230);
       h2{
        font-size:0.4rem;
        font-family:PingFangSC-Regular;
        font-weight:400;
        color:rgba(51,51,51,1);
        line-height:0.55rem;
        margin-bottom: .2rem;
       }
       p{
        font-size:0.3rem;
        font-family:PingFangSC-Regular;
        font-weight:400;
        color:rgba(153,153,153,1);
        line-height:0.425rem;
        .noticedata{
            float: right;
        }
       }
   } 
   .notice_con{
            font-size:0.325rem;
            font-family:PingFangSC-Regular;
            font-weight:400;
            color:rgba(102,102,102,1);
            line-height:0.5rem;
            letter-spacing:0.025rem;
            padding: .275rem 0;
   }
}
</style>
<template>
<div>
    <headTop :theRouter="therouter"></headTop>
    <div class="noticedetails">   
    	<div class="notice_title">
            <h2>{{notice.notice_title}}</h2>
            <p><span>{{notice.creator_id}}</span><span class="noticedata">{{notice.create_time}}</span></p>
            <!-- <p class="aaa">{{notice.file_name}}</p> -->
        </div>
        <div class="notice_con" v-html="notice.notice_content">
            
        </div>
        
        <!-- <button @click="OpenPDF">{{notice.file_name}}</button> -->
        <!-- <a :href='file'>{{notice.file_name}}</a> -->
       
        
    </div>
</div>
</template>
<script>
import { BASEURL } from './../../api/api'
import axios from 'axios'
import headTop from "./../common/header"
import { fileURLToPath } from 'url';
let Base64 = require('js-base64').Base64
export default {
    components: {
     headTop,
    },
    name:'noticedetails',
    data(){
        return{	
            notice:{},
            noticeId:'',
             url: '',
             file:''
        }
    },
    mounted(){
		let _this = this
        _this.noticeId = this.$store.state.noticeId
		_this.init()
	},
    methods: {
        init(){
			let _this = this
			axios.get(BASEURL + 'getNotice?noticeId='+_this.noticeId, {
			}).then(function (res) {
                _this.notice = res.data.notice
			}).catch(function (error) {
				console.log(error);
            })
            
        },
    },
    computed: {
	    therouter: function() {
	      return this.$route
	    }
    }
}
</script>
